package com.sensePlusVR.utils;

import com.sensePlusVR.bean.EventBusBean;

import org.greenrobot.eventbus.EventBus;

public class EventBusUtils {

	//public static final String EVENT_REFRESH_GAEMITEM = "reloadGameItem";
	public static final String EVENT_NOTIFY_FRAGMENT = "notifyFragment";
	public static final String EVENT_NOTIFY_COLLECTION_FRAGMENT = "notifyCollectionFragment";
	public static final String EVENT_NOTIFY_FOLLOWDETAIL_ACTIVITY = "notifyFollowDetailActivity";
	public static final String EVENT_VIDEODETAILDIALOG_CREATE = "videoDetailDialogCreate";
	public static final String EVENT_VIDEODETAILDIALOG_DISMISS = "videoDetailDialogDismiss";
	
	/**
	 * 通知刷新Fragment
	 */
	public static void notifyFragment() {
		EventBusBean eventBusBean = new EventBusBean();
		eventBusBean.setMessage(EVENT_NOTIFY_FRAGMENT);
		EventBus.getDefault().post(eventBusBean);
	}
	
	/**
	 * 通知刷新CollectionFragment
	 */
	public static void notifyCollectionFragment() {
		EventBusBean eventBusBean = new EventBusBean();
		eventBusBean.setMessage(EVENT_NOTIFY_COLLECTION_FRAGMENT);
		EventBus.getDefault().post(eventBusBean);
	}
	
	/**
	 * 通知刷新GameItem
	 */
	public static void notifyFollowDetailActivity() {
		EventBusBean eventBusBean = new EventBusBean();
		eventBusBean.setMessage(EVENT_NOTIFY_FOLLOWDETAIL_ACTIVITY);
		EventBus.getDefault().post(eventBusBean);
	}
	
	/**
	 * VideoDetailDialog创建后
	 */
	public static void videoDetailDialogCreate(){
		EventBusBean eventBusBean = new EventBusBean();
		eventBusBean.setMessage(EVENT_VIDEODETAILDIALOG_CREATE);
		EventBus.getDefault().post(eventBusBean);
	}
	
	/**
	 * VideoDetailDialog销毁后
	 */
	public static void videoDetailDialogDismiss(){
		EventBusBean eventBusBean = new EventBusBean();
		eventBusBean.setMessage(EVENT_VIDEODETAILDIALOG_DISMISS);
		EventBus.getDefault().post(eventBusBean);
	}
	
	

}
